<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>历史版本</title>
    <link href="apps_res/download/css/his_down.css" rel="stylesheet" type="text/css">
    <script src="common/js/jquery.min.js" type="text/javascript"></script>
    <style type="text/css">
        .version_dt {
            font-size: 18px;
        }

        .des_dd {
            font-size: 18px;
        }

        .main_cen {
            height: auto;
            margin-bottom: 30px;
        }
    </style>

</head>
<body>
<div id="app">
    <div class="page" id="show_download">
        <div class="header">
            <a href="javascript:void(0)" class="logo">
                <img :src="historyList[0].logoUrl" />
            </a>
            <span class="title">
			软件下载
		</span>
        </div>
        <div class="main">
            <div class="main_cen">
                <div id="version_div">
                    <p id="version_a">
                        历史版本：
                    </p>
                </div>
                <div style="width: 220px;height:auto;text-align: left;margin: 0 auto;">
                    <dl>
                        <template v-for="history in historyList">
                            <dt class="version_dt">{{history.appVersion}}</dt>
                            <dd class="des_dd" style="word-break:break-all;">描述:{{history.appDescription}}</dd>
                            <dd class="more_dd">
                                <a class="more_a"
                                   :href="'/download.html?appVersion='+history.appVersion+'&custId='+history.custId"
                                   style="text-align: right;width:200px;height: 35px;margin: 0 auto;">更多</a>
                            </dd>
                            <hr />
                        </template>
                    </dl>
                </div>
            </div>
        </div>
    </div>
</div>
<div style="display:none;" id="show_ios">
    <img src="apps_res/download/images/ios.gif" style="width:100%;">
</div>
<script src="http://apps.bdimg.com/libs/vue/1.0.14/vue.js"></script>
<script>
    function getParmKeyValue() {
        var parmArr = location.search.substr(1).split("&");
        var parmsObj = {};
        for (index in parmArr) {
            var parm = parmArr[index].split("=");
            parmsObj[parm[0]] = parm[1];
        }
        return parmsObj;
    }

    var parmMap = getParmKeyValue();

    /**
     * 参数名获取参数值
     *
     * @param parmName
     * @returns {*}
     */
    function getParm(parmName) {
        return parmMap[parmName];
    }

    var historyList = [];

    //获取数据
    $.ajax(
        {
            url: "/homePageAction",
            dataType: "json",
            async: false,
            data: {method: "home"},
            method: "post",
            success: function (result) {
                if (result.success) {
                    custList = result.obj.custList;
                    isLogin = result.obj.isLogin == true ? true : false;
                } else {
                    alert(result.errMsg);
                }
                $.ajax({
                    url: "/appAction",
                    dataType: "json",
                    async: false,
                    data: {method: "history", custId: getParm("custId")},
                    type: "post",
                    success: function (result) {
                        if (result.success) {
                            historyList = result.obj;
                        } else {
                            alert(result.errMsg);
                        >>>>>>>
                            origin / master
                        }
                    }
                });
                var vm = new Vue({
                    el: '#app',
                    data: {
                        historyList: historyList,
                    }
                })
</script>
</body>
</html>